package com.lws.framework.dao;

import java.io.Serializable;
import java.util.List;

public interface BaseDao<T extends Serializable> {

    void save(T transientInstance);

    void delete(Long id);

    void delete(T persistentInstance);

    T findById(Long id);

    List<T> findByExample(T instance);

    List<T> findByProperty(String propertyName, Object value);

    List<T> findAll();

    void update(T detachedInstance);

    Page<T> findByPage(Integer pageNo, Integer pageSize);

    void executeHQL(String hql, Object[] params);
}